package com.zyl.edthresholdtraining.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

/**
 * @author jiangtingfeng
 * @description
 * @date 2020/8/2/002
 */
public class DateUtils {

    public static String getStrDate(Date date){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        //设置为东八区
        sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
        String dateStr = sdf.format(date);
        return dateStr;
    }

}
